**Replication do file for Kalyanpur and Newman (2018)
**To be able to run this do file you will need to download additional data from WRDS. Please refer to the instructions at the IO archive.
**Note that the years in the dataset correspond to the previous financial year. So the year 2000 reported equivalent to the year 2001 for the analysis. 

**Table 1 - main analysis 
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU sunk_US if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1.xls, replace label eform
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU lnassets roa  delta_highprice sunk_US if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1.xls, label eform
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU lnassets roa  delta_highprice sunk_US anti_sd stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1.xls, label eform


**Table 2 - alternate, ie, interaction terms
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU#sunk_US  if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table2.xls, replace label eform
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU#sunk_US lnassets roa  delta_highprice  anti_sd stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table2.xls, label eform
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU#not_sunk_US  if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table2.xls, label eform
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU#not_sunk_US lnassets roa  delta_highprice  anti_sd stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table2.xls, label eform


**Table 3 pre-Sox
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox EU sunk_US if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1998, cluster(tic)
outreg2 using table3.xls, replace label eform
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox EU lnassets roa  delta_highprice sunk_US if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1998, cluster(tic)
outreg2 using table3.xls, label eform
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox EU lnassets roa  delta_highprice sunk_US anti_sd stockcap if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1998, cluster(tic)
outreg2 using table3.xls, label eform

**Figure 1: Hazard Rate Plots
**pre-sox
set scheme s1mono
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox EU sunk_US lnassets roa  delta_highprice  anti_sd stockcap if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1998, cluster(tic)
estimate store Pre_Sox
**post sox
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU sunk_US lnassets roa  delta_highprice  anti_sd stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
estimate store Post_Sox
coefplot (Pre_Sox, label(Pre-Sox)) (Post_Sox, label (Post-Sox)), xline(1) eform label title("Figure 1: Hazard Rates before and after Sox") noci

** Table 4 - Country placebo
*Japan
*pre
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox EU lnassets roa  delta_highprice sunk_US anti_sd stockcap japan if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1999, cluster(tic)
outreg2 using table4.xls, replace label eform
*Post
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU lnassets roa  delta_highprice sunk_US anti_sd stockcap japan if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table4.xls,  label eform

**UK
*pre
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US EU anti_sd stockcap uk if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1999, cluster(tic)
outreg2 using table4.xls,  label eform
*Post
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US EU anti_sd stockcap uk if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table4.xls,  label eform

*APPENDIX
**Robustness Checks
**Table 1.A
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US EU anti_sd stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1a.xls, replace label eform
**Exclude only invol
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US EU anti_sd stockcap  if year >2000 &  year <2005 & delist_invol_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1a.xls, label eform
**Exclude only unknown 
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US EU anti_sd stockcap  if year >2000 &  year <2005 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1a.xls, label eform


**Table 1.B
**Including GDP 
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US EU anti_sd stockcap lngdp if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1b.xls, replace label eform
**Euro
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU euro lnassets roa  delta_highprice sunk_US  anti_sd stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1b.xls, label eform
**Absolute value instead of standard for delta_highprice
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  abs_delta_highprice sunk_US  EU anti_sd stockcap if year >2000 &  year <2005  & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1b.xls, label eform
**stockval instead of stockcap
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice  EU anti_sd sunk_US stockval if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1b.xls, label eform
**Sunk included
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice  EU anti_sd sunk_US sunk stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1b.xls, label eform
**Sunk cost proxy
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox EU lnassets roa  delta_highprice state_taxes_binary anti_sd stockcap if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table1b.xls, label eform



** Country Placebo No EU - Table 4.A
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox  lnassets roa  delta_highprice sunk_US anti_sd stockcap japan if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1999, cluster(tic)
outreg2 using table4a.xls, replace label eform
*Post
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox  lnassets roa  delta_highprice sunk_US anti_sd stockcap japan if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table4a.xls,  label eform
**UK
*pre
quietly: stset timevar1, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US  anti_sd stockcap uk if year >1996 &  year <2001 & delist_invol != 1 & year_entry < 1999, cluster(tic)
outreg2 using table4a.xls,  label eform
*Post
quietly: stset timevar2, id(tic) failure(delist_vol)
quietly: stcox lnassets roa  delta_highprice sunk_US  anti_sd stockcap uk if year >2000 &  year <2005 & delist_invol_all != 1 & delist_unknown_all != 1 & year_entry < 2001, cluster(tic)
outreg2 using table4a.xls,  label eform




